<?php
require_once realpath(dirname(__FILE__) . '//..//..//pages.php');
require_once CLASS_FULL_TAG;

/**
 * This class represents HTML tag label
 *
 * @author Andrea Cantafio
 */
class Label extends FullTag {

    /**
     * Creates a new label.
     * 
     * @param string $label label that will be shown.
     * @param Tag $tag tag that will be labeled.
     * @param array $attributes [Optional]containing the attributes that will be applied to this tag.
     * The array must contain as keys the name of the attributes, pointing to their values.
     */
    public function __construct ($label, $tag, $attributes = null) {
        $tag->anchestor = $this;
        $this->names = array_merge ($this->names, $tag->names);
        $this->ids = array_merge ($this->ids, $tag->ids);
        parent::__construct ("label", $attributes, array ($label, $tag));
    }

}

?>
